
<div class="content">

	<h1> <?php echo $title ;?> </h1>
	<?php 
	echo anchor('disciplina/','Voltar',array('class'=>'back'));
	$this->load->helper('form');
	 if (!isset($registro['codigo']) ){
		echo form_open('disciplina/criar');
	 }
	else
	{
		 echo form_open('disciplina/atualizar');
		 echo form_hidden('codigo_bd', $registro['codigo']);
	};  ?>

	<div class="data" style="width: 50%">
		<table>
			<tr>
				<td style="width: 30%"><label id="nome">Código</label>
				</td>
				<td><input type="input" name="codigo"
					value="<?php echo @$registro['codigo']; ?>" /></td>
			</tr>

			<tr>
				<td valign="top"><label id="nome">Nome</label>
				</td>
				<td><input type="input"" name="nome" value="<?php echo @$registro['nome'];?>" />
				</td>
			</tr>

			<tr>
				<td valign="top"><label id="tipo">Tipo</label>
				</td>
				<td><input type="input" name="tipo" value="<?php echo @$registro['tipo']; ?>" />
				</td>
			</tr>

			<tr>
				<td valign="top"><label id="creditos">Créditos</label>
				</td>
				<td><input type="input" name="creditos" value="<?php echo @$registro['creditos']; ?>"/>
				</td>
			</tr>
			
			<tr>
				<td valign="top"> <input type="submit" name="submit" value="<?php echo (!isset($registro['id'])) ?  "Criar nova sala de Aula" : "Atualizar sala de Aula";?>"  /></td>
			</tr>
		</table>
		
			
		</div>
		<div class="error" style="width: 78.8%"> <?php echo validation_errors(); ?> </div>
		
		</form>		
</div>





